﻿Public Class ChampLocation
    Dim champ As Champ
    Public Sub New(ByVal ch As Champ)

        ' This call is required by the Windows Form Designer.
        InitializeComponent()
        If TypeOf (ch) Is Ferme Then
            champ = New Ferme
            champ = ch
            Label1.Text = "Ferme: " & ch.nomChamp
        ElseIf TypeOf (ch) Is Secteur Then
            champ = New Secteur
            champ = ch
            Label1.Text = "Secteur: " & ch.nomChamp
        ElseIf TypeOf (ch) Is Serre Then
            champ = New Serre
            champ = ch
            Label1.Text = "Serre: " & ch.nomChamp
        Else
            champ = New Billon
            champ = ch
            Label1.Text = "Billon: " & ch.nomChamp
        End If



        ' Add any initialization after the InitializeComponent() call.

    End Sub
End Class